import request from '@/utils/request'

// 显示所有病房
export function showWardList(data) {
  return request({
    url: '/ward/selectAll',
    method: 'post',
    data
  })
}

// 显示病房里病床信息
export function showWardBedByWardId(data) {
  return request({
    url: '/bed/selectOneByWardId?wardId=' + data,
    method: 'get'
  })
}

// 通过病床id查询病床状态
export function getBedStatus(data) {
  return request({
    url: '/bed/selectOne?id=' + data,
    method: 'get'
  })
}

// 更新病房信息
export function updateWardInfo(data) {
  return request({
    url: '/ward/updateOne',
    method: 'post',
    data
  })
}

// 添加病房信息
export function insertWardInfo(data) {
  return request({
    url: '/ward/insertOne',
    method: 'post',
    data
  })
}

// 删除病房信息
export function delWardInfo(data) {
  return request({
    url: '/ward/updateOne',
    method: 'post',
    data
  })
}

export function showAllWardByDepId(date) {
  return request({
    url: '/ward/selectAllByDepId?depId=' + date,
    method: 'get'
  })
}
